from alg import Solution

def test_algorithm():
    # 测试算法
    solution = Solution()
    test_input = 12  
    expected_output = 3  
    output = solution.numSquares(test_input)
    assert output == expected_output, f"Expected {expected_output}, but got {output}"

if __name__ == "__main__":
    test_algorithm()
    print("Test passed successfully!")
